package com.jcl.recruit.resume.logic;

import com.jcl.recruit.resume.dao.ResumeBasicInfoDao;
import com.jcl.recruit.resume.model.ResumeBasicInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

@Component
public class ResumeBasicInfoLogic {

    @Autowired
    private ResumeBasicInfoDao resumeBasicInfoDao;


    public List<Map<String, Object>> findAllMap(String corpCode) {
        return resumeBasicInfoDao.findAllMap(corpCode);
    }

    public List<ResumeBasicInfo> findAll(String corpCode) {
        return resumeBasicInfoDao.findAll(corpCode);
    }

    public List<ResumeBasicInfo> findList(List<Integer> ids) {
        return resumeBasicInfoDao.findList(ids);
    }

    public Map<String, Object> findOneMap(Integer id) {
        return resumeBasicInfoDao.findOneMap(id);
    }

    public ResumeBasicInfo findOne(Integer id) {
        return resumeBasicInfoDao.findOne(id);
    }

    public ResumeBasicInfo findOneByExternalKey(String corpCode, String externalKey) {
        return resumeBasicInfoDao.findOneByExternalKey(corpCode, externalKey);
    }

    public int add(ResumeBasicInfo entity) {
        return resumeBasicInfoDao.add(entity);
    }

    public int update(ResumeBasicInfo entity) {
        return resumeBasicInfoDao.update(entity);
    }

    public int delete(Integer id) {
        return resumeBasicInfoDao.delete(id);
    }
}
